jQuery(document).ready(function() {
	jQuery('#myOrderTable').dataTable({
		"sPaginationType": "full_numbers",
		"oLanguage": {
			"sLengthMenu": "每页显示 _MENU_ 条记录",
			"sZeroRecords": "抱歉， 没有找到",
			"sInfo": "从 _START_ 到 _END_ /共 _TOTAL_ 条数据",
			"sInfoEmpty": "没有数据",
			"sInfoFiltered": "(从 _MAX_ 条数据中检索)",
			"sSearch":"全文搜索:",
			"oPaginate": {
			"sFirst": "首页",
			"sPrevious": "前一页",
			"sNext": "后一页",
			"sLast": "尾页",
			},
			"sZeroRecords": "没有检索到数据",
			"sProcessing": "<img src='./loading.gif' />"
		},
		"aaSortingFixed": [[0,'asc']],
		"fnDrawCallback": function(oSettings) {
            jQuery('input:checkbox,input:radio').uniform();
        }
	});
});

function cancelOrder(id) {
	jQuery.ajax({
		   type: "post",
		   url: "/cms/order/cacelOrder",
		   dataType:"json",
		   data: {id: id},
		   success: function(data){
			   if(data.flag == true) {
				   	window.location.reload();
	                jQuery.jGrowl("恭喜您，取消预订成功！");
	                
			   }else {
				   jQuery.jGrowl("很抱歉，取消预订失败！");
			   }
		   },
			error:function(e) {  
				jQuery.jGrowl("很抱歉，取消预订失败！");
	        }
		 });
}

